// txt_pqdifDlg.h : header file
//

#if !defined(AFX_TXT_PQDIFDLG_H__4A55BE06_C814_11D2_A902_D943642F7B65__INCLUDED_)
#define AFX_TXT_PQDIFDLG_H__4A55BE06_C814_11D2_A902_D943642F7B65__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "ChannelPage.h"
#include "ContainerPage.h"
#include "DataSourcePage.h"

#include "ConfigFile/configfile_control.h"
#include "ConfigFile/mcf_ipqd_type.h"

#ifdef _DEBUG
#pragma comment(lib,"CfgFileResolutionDbg")
#pragma comment(lib,"ConfigFileDbg")
#else
#pragma comment(lib,"CfgFileResolution")
#pragma comment(lib,"ConfigFile")
#endif



class CTxt_pqdifDlg : public CPropertySheet
{
// Construction
public:
	CTxt_pqdifDlg(CWnd* pParent = NULL);	// standard constructor
	~CTxt_pqdifDlg();

// Dialog Data
	//{{AFX_DATA(CTxt_pqdifDlg)
	enum { IDD = IDD_TXT_PQDIF_DIALOG };
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTxt_pqdifDlg)
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;
	CContainerPage m_ContainerPage;
	CChannelPage m_ChannelPage;
	CDataSourcePage m_DataSourcePage;

	CButton m_BtnDone;
	CButton m_BtnSaveCfg;
	CButton m_BtnOpenCfg;

	CButton m_BtnAddContainer;
	CButton m_BtnAddDataSource;

	RECT m_PageRect;
	virtual BOOL OnNotify (WPARAM wParam, LPARAM lParam, LRESULT *pResult);

	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg void OnSaveCfg();
	afx_msg void OnOpenCfg();

	//afx_msg void OnAddContainer();
	//afx_msg void OnAddDataSource();


	afx_msg void OnDone();
	afx_msg void OnHelp ();
	DECLARE_MESSAGE_MAP()
public:
	DWORD GetHelpContext () {return m_dwHelpContext;}
	void TransferContainer(MCFContainerInfo* pCI);
	void TransferDataSource(MCFDataSourceInfo* pDSI);
	void TransferChanSeries(vector<MCFChannelNode>&  vecChannelArray);

	void UpdateContainer( MCFContainerInfo* pCI);
	void UpdateDataSource(MCFDataSourceInfo* pDSI);
	void UpdateChanSeries(const vector<MCFChannelNode>&  vecChannelArray);

	void ClearAllInfo();


	
private:
	DWORD m_dwHelpContext;
	VirtualBinaryCfgFile* m_BinarCfgFile;

private:
	MCFContainerInfo  m_ContainerInfo;
	MCFDataSourceInfo  m_DataSourceInfo;
	MCFChannelNode m_ChanSeriesArray[MCF_CEL_MAX_COUNT];

	bool isOpenedFile;
};


#endif //
